﻿namespace star_questionnair.Services;

public interface ITimeService
{
    /// <summary>
    /// 计算给定问卷的平均完成时间（分钟）
    /// </summary>
    /// <param name="questionnaireId">问卷 ID</param>
    /// <returns>平均完成时间（分钟）</returns>
    Task<double> AverageFinishedTimeAsync(int questionnaireId);

    /// <summary>
    /// 根据时间段分析给定问卷的响应情况
    /// </summary>
    /// <param name="questionnaireId">问卷 ID</param>
    /// <returns>每个时间段的响应计数</returns>
    Task<Dictionary<string, int>> GetResponsesByTimePeriodAsync(int questionnaireId);

    /// <summary>
    /// 根据星期几分析给定问卷的响应情况
    /// </summary>
    /// <param name="questionnaireId">问卷 ID</param>
    /// <returns>每个星期几的响应计数</returns>
    Task<Dictionary<string, int>> GetResponsesByDayOfWeekAsync(int questionnaireId);
}